package com.hrpmar.service.impl;

import com.hrpmar.mapper.powerMapper;
import com.hrpmar.pojo.Department;
import com.hrpmar.pojo.Role;
import com.hrpmar.service.powerServer;
import com.hrpmar.utils.Pager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by 31984 on 2017/11/29.
 */
@Service
@Transactional
public class powerServerImpl implements powerServer {

    @Resource
    private powerMapper powermapper;

    @Override
    public List<Department> list() {
        return powermapper.list();
    }

    @Override
    public List<Role> lists(Integer id) {
        List<Role> SS= powermapper.search(id);
        return SS;
    }

    @Override
    public Integer updates(Department func) {
        return powermapper.update(func);
    }

    @Override
    public Department searchIdby(Integer ids) {
        return powermapper.searchIdby(ids);
    }

    @Override
    public Integer inserts(Department func) {

        return powermapper.inserts(func);
    }

    @Override
    public Integer playadd(Role role) {
        return powermapper.playadd(role);
    }

    @Override
    public Integer roleUpdate(Role role) {
        return powermapper.roleUpdate(role);
    }

    @Override
    public Integer del(Integer roleId) {
        return powermapper.del(roleId);
    }


}
